using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using NetROS.Tiers.Entities;
using System.Windows.Forms;

namespace NetRosApp.Klijenti.Reports
{
    public partial class rptXtraPromjenaCijene : DevExpress.XtraReports.UI.XtraReport,IParametriIzvjestaja
    {
        public rptXtraPromjenaCijene()
        {
            InitializeComponent();
        }

        public rptXtraPromjenaCijene(Dokument dokument)
        {
            InitializeComponent();
            bindingSource1.DataSource = dokument;
            
            //System.Drawing.Imaging.Metafile tmp = new System.Drawing.Imaging.Metafile(@"H:\NetROS\NetRosApp\Slike\Reporti\zaglavlje.wmf");
           // System.Drawing.Imaging.Metafile tmp = new System.Drawing.Imaging.Metafile(Application.StartupPath + "\\zaglavlje.wmf");
           // int visina = tmp.Size.Height;
           // int duzina = tmp.Size.Width;
           // if (visina != 0)
           // {
           //     xrPictureBox1.Height = (int)(((decimal)tmp.Height / (decimal)tmp.Width) * (decimal)625);
           // }

           //xrPictureBox1.Image = tmp;
           

        }

        public void SetParametri()
        {
          //  xrLParametar1.Text = (bindingSource1.DataSource as Dokument).IDDokumentTipSource.PrilagodenDokumentTip.Parametar1;


            //String Otpremnice = String.Empty;
            //foreach (Veza tmp in (bindingSource1.DataSource as Dokument).VezaCollectionGetByIDParent)
            //{
            //    if (tmp.IDChildSource.IDDokumentTip == (int)DokumentTipList.Otpremnica)
            //    {
            //        Otpremnice += tmp.IDChildSource.Oznaka + " ";
            //    }
            //}
            //xrlIzdatnice.Text = Otpremnice;
        }
    }
}
